browserLoadRequest
Type
message
Summary
Sent when a URL has been requested.
Syntax
browserLoadRequest <pUrl>, <pType>
Description
Handle the browserLoadRequest message to perform an action when a URL has been requested.
The browserLoadRequest message is sent to the object containing the script that created the mobile browser control after a url has been requested.
Not passing the message causes the load request to not go ahead.
The browserLoadRequest is only sent if delayRequests has been set to true.
Delaying requests can cause web pages that load pages into sub-documents to not work correctly.
The browserLoadRequest message is sent in response to the webView:shouldStartLoadWithRequest: delegate method.
Parameters
Name | Type | Description |
---|---|---|
pUrl | The URL that has started to load. | |
pType | enum | The reason for the request.
|
Examples
on browserLoadRequest pURL, pType
answer "Do you want to load:" && pURL with "Yes" and "No"
if it is "Yes" then
pass browserLoadRequest
else
put "Refused:" && pURL into field "Status"
end if
end browserLoadRequest
Related
command: mobileControlCreate, mobileControlDelete, mobileControlSet
function: mobileControlGet, mobileControlTarget, mobileControls
message: browserStartedLoading, browserLoadFailed, browserFinishedLoading
Compatibility and Support
Introduced
LiveCode 4.5.3
OS
ios
Platforms
mobile